import 'package:flutter/cupertino.dart';
import 'package:flutter_hx/pages/root/cart/cart_view.dart';
import 'package:flutter_hx/pages/root/home/home_view.dart';
import 'package:flutter_hx/pages/root/me/me_view.dart';
import 'package:flutter_hx/pages/root/pm/pm_view.dart';

import 'package:get/get.dart';

class RootLogic extends GetxController {
  ///当前下标
  late int _currentIndex;
  ///主页界面子页面
  late List<Widget> mainIndexStackPages;

  set currentIndex(int index){
    _currentIndex=index;
    update();
  }

  int get currentIndex=>_currentIndex;

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    _currentIndex = 0;
    mainIndexStackPages = const[
      HomePage(),
      PmPage(),
      CartPage(),
      MePage(),
    ];
  }

}
